package com.yangmao.service.impl;

import com.github.pagehelper.PageHelper;
import com.yangmao.dao.HealthEducationDao;
import com.yangmao.entity.ActivityInfo;
import com.yangmao.entity.HealthEducation;
import com.yangmao.service.api.HealthEducationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘洋毛’
 * @version 1.0
 * @description: TODO
 * @date 2022/1/7 10:18
 */
@Service
public class HealthEducationServiceImpl implements HealthEducationService {

    @Autowired
    private HealthEducationDao healthEducationdao;

    @Override
    public List<HealthEducation> getAllHealthEducation(int page, int size) {
        PageHelper.startPage(page,size);
        return healthEducationdao.getAllHealthEducation();
    }

    @Override
    public void updateHealthEducation(HealthEducation healthEducation) {
        healthEducationdao.updateHealthEducation(healthEducation);
    }

    @Override
    public void deleteHealthEducation(String id) {
        healthEducationdao.deleteHealthEducation(id);
    }

    @Override
    public void addHealthEducation(HealthEducation healthEducation) {
        healthEducationdao.addHealthEducation(healthEducation);
    }

    @Override
    public HealthEducation getHealthEducationById(String id) {
        return healthEducationdao.getHealthEducationById(id);
    }
}
